<% @main_header = "#{link_to('Ptrack:', '/')} #{@project.name if @project}: Documents" %>

<div style="color:red;">
<%= error_messages_for :document %>
</div>

<% form_for (@document, :url => {:action => 'create'}, :html => { :multipart => true}) do |f| %>
<div style="float: left; width: 100%;">
<fieldset>
<legend>Document Options</legend>

<table style="width:47%; float:left;" cellspacing="0" cellpadding="0">
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
	
	<tr>
		<td>
			<%= f.label :name, 'Document Name:' %>
		</td>
		<td>
			<%= f.text_field :name, :style => "width:197px;"%>
		</td>
	</tr>
	

</table>

<table style="width:50%; valign:top;" cellspacing="0" cellpadding="0">
	<tr>
	  <td >
	    <%= f.label :doc_file, 'File:' %>
	  </td>
	  <td rowspan="5">
	    <%= f.file_field :doc_file %>			
	  </td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>&nbsp;</td>
	</tr>
	
</table>
</fieldset>
</div>
<br />

<table style="width: 100%;">
	<tr>
		<td style="text-align: right; width: 50%;">
		<%= f.submit "Save Document" %> 
		</td>
		

<% end %>

<td style="text-align: left; width: 50%;">
		<%= button_to "Cancel", {:action => "index"}, {:method => :get} %>
		</td>
	</tr>
</table>
